﻿#include "collision.h"

// 碰撞箱抽象类
CollisionBox::CollisionBox() : type_(CollisionBoxType::Point) {}
CollisionBox::CollisionBox(CollisionBoxType type) : type_(type) {}


// 获取碰撞箱类型
CollisionBoxType CollisionBox::getType() const {
	return type_;
}

// 静态方法，检测任意两个碰撞箱的碰撞
bool CollisionBox::checkCollision(const CollisionBox& box1, const CollisionBox& box2) {
	return box1.checkCollision(box2);
}
